<!--
 醫學美容糾察隊 - PIXNET's layout engine
 HTML template for homepage
 by HappyDenn | 20100118
-->

<textarea id="template-area">
    
    <!-- main template -->
    {#template MAIN}
    <div id="login-bar" class="align-right">{$T.loginBar}</div>
    <div id="top-panel" class="layout_6">
        <a id="logo" class="box-container width_1 height_1" href="/blog">
            <img src="http://pic.pimg.tw/dmt2009/4b1d9927e8fd8.gif" title="醫學美容糾察隊">
        </a>
        {#foreach $T.categories as category}
        <div class="category-box_{$T.category$index + 1} box-container width_1 height_1">
            <h1>{$T.category.heading}</h1>
            <ul>
                {#foreach $T.category.children as child}
                <li><a class="category-link" href="{$T.child.href}">{$T.child.title}</a></li>
                {#/for}
            </ul>
        </div>
        {#/for}
        <div id="search" class="box-container width_1 height_1">
            <h1>搜尋文章</h1>
        </div>
        <a id="facebook-link" class="box-container width_1 height_1" href="http://www.facebook.com/group.php?v=wall&gid=244715558369" target="_blank">
            <h1>Facebook 社團</h1>
        </a>
    </div>
    {#if $T.pageType == 'home' || $T.pageType == 'category'}
    {#include articleList root=$T}
    {#include homeSidebar root=$T}
    {#/if}
    <div class="clear"></div>
    <div id="copyright" class="align-center">
        版權所有 © 2010 by <a href="http://wowbuty.pixnet.net/blog">醫學美容糾察隊</a> |
        網頁設計 by HappyDenn | Powered by <a href="http://www.pixnet.net" target="_blank">痞客邦</a>
    </div>
    {#/template MAIN}
    
    <!-- article list template -->
    {#template articleList}
    <div id="article-list" class="layout_5">
        {#foreach $T.articles as article}
        <a class="article-list-item box-container width_1 height_1" href="{$T.article.permalink}">
            <div class="publish-date">{$T.article.publishMonth} {$T.article.publishDate}, {$T.article.publishYear}</div>
            <h2>{$T.article.title}</h2>
            {#if $T.article.thumbnail != undefined}<img class="article-thumbnail" src="{$T.article.thumbnail}">{#/if}
        </a>
        {#/for}
        {#for i = $T.articleCount to 14}
        <div class="article-list-item box-container width_1 height_1"></div>
        {#/for}
    </div>
    {#/template articleList}
    
    <!-- sidebar on homepage -->
    {#template homeSidebar}
    <div id="home-sidebar" class="layout_1">
        <div id="voting" class="box-container width_1 height_2">
            <h1>投票區</h1>
        </div>
        <div id="sticker" class="box-container width_1 height_2/3"></div>
        {#include counter root=$T}
    </div>
    {#/template homeSidebar}
    
    {#template counter}
    <div id="counter" class="box-container width_1 height_1/3"><div><div>
        
    </div></div></div>
    {#/template counter}

</textarea>
